<%-- 
    Document   : ThongKeKetQuaThi
    Created on : Mar 22, 2012, 8:54:52 PM
    Author     : ducquyen
--%>

<%@page import="Pojo.Ketqua"%>

<%@page import="java.util.List"%>

<%@taglib  uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<div id="idcustomer">
    <div id="title_thongtin"><b id="customizecauhoi">Thống kê kết quả thi</b></div>
    <div style="height: 20px"></div>


    <div style="height: 15px"></div>
    <div id="cauhoi">
        <div style="height: 15px"></div>
        <div style="margin-left: 10px;margin-right: 10px">
            <table style="width: 100% " border="1">
                <tr>
                    <td style="width: 25% ;text-align: center ">Họ tên</td>
                    <td style="width: 15% ;text-align: center">CMND</td>
                    <td style="width: 10% ;text-align: center ">Đề thi</td>
                    <td style="width: 20% ;text-align: center ">Thời Gian Bắt Đầu</td>
                    <td style="width: 20% ;text-align: center ">Thời Gian Kết Thúc</td>
                    <td style="width: 10% ;text-align: center ">Điểm</td>                    
                </tr>

                <%

                    if (session.getAttribute("thongKeKetQuaThi_ketQuaThongKe") != null) {
                        List<Ketqua> arrkq = (List<Ketqua>) session.getAttribute("thongKeKetQuaThi_ketQuaThongKe");
                        if (arrkq.size() > 0) {
                            for (int i = 0; i < arrkq.size(); i++) {
                                Ketqua kq = arrkq.get(i);

                %>
                <tr>
                    <td style="width: 25% ;text-align: center "><b style="font-weight: bold"><%= kq.getThisinh().getHoTen()%></b></td>
                    <td style="width: 15% ;text-align: center"><%= kq.getThisinh().getCmnd()%></td>
                    <td style="width: 10% ;text-align: center "><a href="DeThisinhDaThiAdmin?madethi=<%= kq.getDethi().getMaDeThi()%>"> <%= kq.getDethi().getMaDeThi()%></a></td>
                    <td style="width: 20% ;text-align: center "><%= kq.getThoiGianBatDau()%></td>
                    <td style="width: 20% ;text-align: center "><%= kq.getThoiGianKetThuc()%></td>
                    <td style="width: 10% ;text-align: center "><%= kq.getDiem()%></td>                    
                </tr>
                <%          }
                %>

            </table>
            <div style="height: 15px"></div>

        </div>
        <div style="margin-left: 10px;margin-right: 10px ; text-align: center">Trang : 

            <%
                if (request.getParameter("Trang") != null && request.getParameter("TongSoTrang") != null) {
                    int soLuongTrang = Integer.parseInt(request.getParameter("TongSoTrang"));
                    int trang = Integer.parseInt(request.getParameter("Trang"));
                    if (trang > 1) {%>
            <a href="ThongKeKetQuaThicontroller?Action=View&Trang=<%=1%>">[Đầu]</a>
            <a href="ThongKeKetQuaThicontroller?Action=View&Trang=<%=trang - 1%>">[Trước]</a>
            <%  }

                for (int i = 1; i <= soLuongTrang; i++) {
            %>
            <a href="ThongKeKetQuaThicontroller?Action=View&Trang=<%=i%>" style="<%if (trang == i) {
                    out.print("font-size: large ;font-weight: bold");
                }%>" > <%=i%> </a>

            <%  }

                if (trang < soLuongTrang) {

            %>
            <a href="ThongKeKetQuaThicontroller?Action=View&Trang=<%=trang + 1%>">[Sau]</a>
            <a href="ThongKeKetQuaThicontroller?Action=View&Trang=<%=soLuongTrang%>">[Cuối]</a>
            <%  }
            %>
        </div>
        <div style="height: 15px"></div>



        <%      }
                    }
                }
            %>
    </div>
    <div style="height: 15px"></div>
</div>
